package com.pms.service;

import java.util.List;

import com.pms.dao.TaskDao;
import com.pms.entity.Task;

public class TaskService {

	TaskDao taskDao = new TaskDao();

	public void save(Task task) {
		taskDao.save(task);
	}

	public List<Task> findAllTask() {
		return taskDao.findAllTask();
	}

	public void updateTaskById(Task task, String taskId) {
		taskDao.updateTaskById(task, taskId);
	}

	public List<Task> findAllTaskByGoalId(String goalId) {
		return taskDao.findAllTaskByGoalId(goalId);
	}

	public double rate(String goalId){
		return taskDao.rate(goalId);
	}
	public Task findTaskById(String taskId) {
		return taskDao.findTaskById(taskId);
	}
	
	
}
